home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / MAPEDIT.ZIP / PAINT.H < prev    next >
C/C++ Source or Header  |  1993-05-13  |  2KB  |  91 lines

  1. #include <dos.h>
  2. #include <bios.h>
  3. #include <stdio.h>
  4. #include <malloc.h>
  5. #include <process.h>
  6.  
  7. #define scrptr (char far *)0xA0000000
  8. #define sign(x) ((x) > 0 ? 1:  ((x) == 0 ? 0:  (-1)))
  9. #define plot(x,y,color)    *(scrptr+((long)(y)*(long)(320))+(long)(x)) = color
  10. #define xplot(x,y,color)    *(scrptr+((long)(y)*(long)(320))+(long)(x)) ^= color
  11. typedef char BOOL;       /* Boolean flag                                 */
  12.  
  13.  
  14. BOOL save_pcx(char *fname,char far * buffer);
  15.  
  16.  
  17. char far *bufptr;
  18.  
  19. int lcol,mcol,rcol;
  20. struct pal_struct{
  21.     unsigned char red;
  22.     unsigned char green;
  23.     unsigned char blue;
  24. }
  25. pal[256];
  26.  
  27. struct character_attribute_struct{
  28.     unsigned int block :4;
  29.     unsigned int door_jump_to  :5;
  30. }* ca;
  31.  
  32. pch(int px,int py,unsigned int outchar);
  33.  
  34. int far *escr;
  35. int far *mapptr;
  36.  
  37. unsigned int cchar;
  38.  
  39. char far *animptr;
  40. char csptr[256][8][8];
  41.  
  42. unsigned int tbar;
  43. unsigned char cvis;
  44.  
  45.  unsigned int screen[1000];
  46.  
  47. #define NORMAL_MODE     0
  48. #define EDIT_MODE       1
  49. #define COPY_MODE       2
  50. #define DEST_MODE       3
  51. #define DRAW_MODE       4
  52.  
  53.  
  54. #define TOP_BLOCK       1
  55. #define BOTTOM_BLOCK    2
  56. #define LEFT_BLOCK      4
  57. #define RIGHT_BLOCK     8
  58. #define ALL_BLOCK       15
  59.  
  60. int mouseon;
  61. int mousex,mousey,mouseb,oldb;   /* 1 = 1 pixel      */
  62. int chy;                         /* 1 = 1 character  */
  63. int mapx, mapy;                  /* 1 = 1 character  */
  64. int current_mode;
  65. int numfiles;
  66. char filename[256][20];
  67.     FILE *fptr;
  68.  
  69.     union REGS inmregs;
  70.     union REGS outmregs;
  71.  
  72. #define mousecursor(a) {if (a) inmregs.x.ax=1; else inmregs.x.ax=2; int86(0x33,&inmregs,&outmregs);}
  73.  
  74. struct db_info {
  75.     int num_sprites;
  76.     char dummy[1000];
  77. }db;
  78.  
  79. struct sprite_struct {
  80.     int width;
  81.     int height;
  82.     FILE * start;
  83.     int xs;
  84.     int ys;
  85.     char *pict;
  86.     char name[20];
  87.     char dummy[20];
  88. }si[100];
  89. char mapname[64];
  90. char charsetname[64];
  91.